<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="myauctioneer.dto.User"%>
<%@ include file="header.jsp"%>
<% User u = (User) request.getAttribute("user"); %>
<div id="content">
	<h1>Profile of User <%= u.getUserId() %></h1>
	<p>
		<%
			out.println("<strong>name: </strong>" + u.getName()
					+ "<br /><strong>address: </strong>" + u.getAddress()
					+ "<br /><strong>phone: </strong>" + u.getPhone()
					+ "<br /><strong>email: </strong>" + u.getEmail()
					+ "<br />");
		%>
	</p>
	<p>
	<h2>Ratings:</h2>
	<p>
		<%
			out.println("<strong><a href=\"" + App.getBaseUrl()
					+ "/user/showRatingDetails?userId=" + u.getUserId()
					+ "&type=articleRating\">article ratings ("
					+ request.getAttribute("numberArticleRatings")
					+ ")</a></strong><br />");
			out.println("<strong><a href=\"" + App.getBaseUrl()
					+ "/user/showRatingDetails?userId=" + u.getUserId()
					+ "&type=sellerRating\">seller ratings ("
					+ request.getAttribute("numberSellerRatings")
					+ ")</a></strong><br />");
			out.println("<strong><a href=\"" + App.getBaseUrl()
					+ "/user/showRatingDetails?userId=" + u.getUserId()
					+ "&type=buyerRating\">buyer ratings ("
					+ request.getAttribute("numberBuyerRatings")
					+ ")</a></strong><br />");
		%>
	</p>
	<p>
		<a href="<%=App.getBaseUrl()%>" class="backlink">&larr; back to
			startpage</a>
	</p>
</div>
<%@ include file="footer.jsp"%>
